package com.example.abstractprocessordemo;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.example.libannotation.BindActivity;
import com.example.libannotation.BindView;
import com.example.libannotation.contentView;
import com.example.libannotation.viewClick;

@BindActivity
public class MainActivity2 extends AppCompatActivity implements View.OnClickListener{
    @contentView(contentId = R.layout.activity_main2)
    View view;
    @BindView(viewId = R.id.text2)
    TextView tv1;
    @BindView(viewId = R.id.text3)
    TextView tv2;
    @BindView(viewId = R.id.btn1)
    @viewClick
    Button button;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        BindMainActivity2.bind(this);
    }

    @Override
    public void onClick(View v) {
        if(v.getId() == R.id.btn1){
            tv1.setText("已清空");
            tv2.setText("已清空");
        }
    }
}